Virtual lens simulation for video and photo cropping

ABSTRACT

In a video capture system, a virtual lens is simulated when applying a crop or zoom effect to an input video. An input video frame is received from the input video that has a first field of view and an input lens distortion caused by a lens used to capture the input video frame. A selection of a sub-frame representing a portion of the input video frame is obtained that has a second field of view smaller than the first field of view. The sub-frame is processed to remap the input lens distortion to a desired lens distortion in the sub-frame. The processed sub-frame is the outputted.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.62/164,409 filed on May 20, 2015, the contents of which are incorporatedby reference herein.

BACKGROUND

Technical Field

This disclosure relates to video editing, and more specifically, tosimulating a virtual lens in a cropped image or video.

Description of the Related Art

It is often desirable to perform crop or zoom operations on highresolution images or video frames to extract a reduced field of viewsub-frame. Particularly, for wide angle or spherical images or video,subjects in the originally captured content may appear very small.Furthermore, much of the captured field of view may be of littleinterest to a given viewer. Thus, cropping or zooming the content canbeneficially obtain an image or video with the subject more suitablyframed. Wide angle lens used to capture wide angle or spherical contentmay introduce the perception of distortion that tends to increase nearthe edges and corners of the captured frames due to the fact that thecameras are projecting content from a spherical world onto a rectangulardisplay. Thus, cropping an image to extract a sub-frame near an edge orcorner of a wide angle image capture may result in an image havingsignificantly different distortion than a sub-frame extracted from acenter of the image. Furthermore, the cropped image will have adifferent overall distortion effect than the original image. Thesedistortion variations may be undesirable particularly when combiningcropped sub-frames corresponding to different regions of a video (e.g.,to track movement of a subject of interest), or combining croppedsub-frames with uncropped frames (e.g., to produce in zoom effect).

BRIEF DESCRIPTIONS OF THE DRAWINGS

The disclosed embodiments have other advantages and features which willbe more readily apparent from the following detailed description of theinvention and the appended claims, when taken in conjunction with theaccompanying drawings, in which:

FIG. 1 illustrates example representations of input images and editedoutput images generated from the respective input images.

FIG. 2A illustrates an example embodiment of a re-pointing effectintroduced into an image captured by a fisheye camera lens.

FIG. 2B illustrates an example embodiment of a re-pointing effectintroduced into an image captured by a rectilinear camera lens.

FIG. 3 illustrates an example network environment for capturing andediting images or video.

FIG. 4 illustrates an example architecture of a camera.

FIG. 5 illustrates an example embodiment of a video server.

FIG. 6 illustrates an example embodiment of a process for simulating avirtual lens when applying a crop or zoom effect to an input video togenerate an edited output video.

DETAILED DESCRIPTION

The figures and the following description relate to preferredembodiments by way of illustration only. It should be noted that fromthe following discussion, alternative embodiments of the structures andmethods disclosed herein will be readily recognized as viablealternatives that may be employed without departing from the principlesof what is claimed.

Reference will now be made in detail to several embodiments, examples ofwhich are illustrated in the accompanying figures. It is noted thatwherever practicable similar or like reference numbers may be used inthe figures and may indicate similar or like functionality. The figuresdepict embodiments of the disclosed system (or method) for purposes ofillustration only. One skilled in the art will readily recognize fromthe following description that alternative embodiments of the structuresand methods illustrated herein may be employed without departing fromthe principles described herein.

Configuration Overview

In an image or video capture system, a virtual lens is simulated whenapplying a crop or zoom effect to an input image or video. An inputimage or video frame is received that has a first field of view of ascene. The input image or video frame depicts the scene with an inputlens distortion caused by lens characteristics of a lens used to capturethe input image or video frame. A selection of a sub-frame representinga portion of the input image or video frame is obtained that has asecond field of view of the scene smaller than the first field of view.The sub-frame is processed to remap the input lens distortion centeredin the first field of view to a desired lens distortion in the sub-framecentered in the second field of view. The processed sub-frame is theoutputted.

Effects of Camera Lens Curvature

FIG. 1 illustrates example representations of images (e.g., images102-A, 102-B, 102-C, 102-D) and output images (e.g., images 104-A,104-B, 104-C, 104-D) generated from editing the original images 102. Inan embodiment, the images 102 or 104 may comprise frames of video. Forimages or video captured using a wide angle lens, the projection of thecaptured images 102 onto a rectangular display may result in theappearance of increased distortion (e.g., curvature) in the edge andcorner regions of the images 102 relative to the center region. Forexample, some wide angles lenses may produce a fisheye effect in whichstraight lines in the scene that are near the edge and corner regions ofthe image appear increasingly curved in the captured image. The outputimages may include zooming and/or panning effects in which a reducedfield of view image may be extracted which may be of varying size andlocation in different images. For example, a zooming effect isintroduced between images 104-A and 104-B to go from the original fieldof view in output image 104-A to a reduced field of view image in outputimage 104-B. The particular reduced field of view (e.g., a sub-frame)may be selected manually by a video editor in post-processing, or may beselected automatically to generate images or video likely to be ofinterest to a viewer based on various metadata. The metadata may alsospecify lens characteristics of the lens used to capture images or videoframes. In another example, the image may be zoomed further in image104-C and panned between image 104-C and 104-D (e.g., to track themovement of the person in a video). As a result of the wide angle lensintroduced in the original images 102, different sub-frames may havecompletely different distortion characteristics from each other and fromthe original images 102. For example, sub-frames 104 taken from near thecenter of the captured image (e.g., sub-frame 104-C) may appearrelatively undistorted and will not exhibit significant curvature aroundthe edges (e.g., straight lines in the portion of the scene depicted bysub-frame 104-C may appear fairly straight in sub-frame 104-C), whilesub-frames taken from the corner or edge regions of the image (e.g.,sub-frame 104-D) may appear to have high curvature distortion (e.g.,straight lines in the portion of the scene depicted by sub-frame 104-Dmay appear highly curved in sub-frame 104-D). Additionally, absent otherprocessing, the distortion present in a given sub-frame 104 may appeardifferently depending on the size of the sub-frame and will not have thesame lens characteristic (e.g., fisheye effect) as the originallycaptured image 102 from which it was derived.

When producing an output video or images from original content thatincludes cropping, zooming, re-pointing, and/or panning, it may bedesirable for the output video or images to exhibit consistent lenscharacteristics. Thus, for example, it may be desirable for croppedsub-frames extracted from different portions of an original video toexhibit similar lens characteristics. Furthermore, it may be desirablefor cropped sub-frames of different size to exhibit similar lenscharacteristics to each other and to the original uncropped video. Thus,to achieve this effect, a virtual lens model is applied to each of theextracted sub-frames 104 to produce consistent lens characteristicsacross each output image. As a result, the output images may simulatethe same effect that would have been achieved by a camera operatormanually re-orienting and/or physically moving the camera to produce thepanning, re-pointing, cropping, and/or zooming effects. In oneembodiment, the output images 104 may be processed so that the lenscharacteristics in the output images 104 match the characteristicsnaturally appearing in the original images 102. For example, each of thesub-frames 104-B, 104-C, 104-D may be processed to have a similarfisheye effect as the sub-frame 104-A as if the scenes depicted insub-frames 104-B, 104-C, 104-D were natively captured in the same way asthe original images 102. Alternatively, any desired lens characteristicmay be applied that does not necessarily match the lens characteristicof the original image 102. In this way, a cohesive output video or setof images may be generated with consistent lens characteristics fromframe-to-frame so that it is not apparent to the viewer that thepanning, re-pointing, or zooming effects were created in post-processinginstead of during capture. This process may be applied to any type oflens distortion including, for example, lens distortion characteristicof conventional lenses, wide angle lenses, fisheye lenses, zoom lenses,hemispherical lenses, flat lenses or other types of camera lenses.

FIG. 2A illustrates an example of a virtual camera re-pointing in acamera that produces a fisheye wide angle projection. In the capturedimage 222, the camera is pointed at the center of the house. Thus, thestraight lines of the house appear fairly straight in the image 222although some curvature may appear with greater distance from the centerof image 222. The camera may be virtually re-pointed (e.g., inpost-processing) to center the shot to the right of the house, either bypanning or re-pointing the view window or cropping the view as shown bythe dotted lines to produce the image 224. In image 224, the same sceneis shown but with the view now centered to the right of the house. Ascan be seen, the lens distortion may be centered in image 224 so thatstraight lines of the house (which is no longer centered) may appear tohave greater curvature. The image 224 may be generated from the image222 and may simulate an image that would have been captured by thecamera if the scene had been captured with the camera pointed to thelocation to the right of the house. As will be apparent, the virtualrepointing of the camera creates a very different curvature effect thanif original image 222 was simply cropped to re-center at the newlocation.

FIG. 2B illustrates another example in a camera that produces arectilinear projection instead of a fisheye projection. In image 232,the camera is pointed at the center of the house. Image 234 is generatedby virtually re-pointing the camera to re-center the scene at a point tothe right of the house, thus introducing some perceived distortion inthe depiction of the house. The image 234 may be generated from theimage 232 and simulates an image that would have been captured by thecamera if the scene had been captured with the camera pointed to thelocation to the right of the house.

Example Media Processing System

FIG. 3 is a block diagram of a media processing system 300, according toone embodiment. The media content system 300 may include one or moremetadata sources 310, a network 320, a camera 330, a client device 335and a media server 340. In alternative configurations, different and/oradditional components may be included in the media content system 300.Examples of metadata sources 310 may include sensors (such asaccelerometers, speedometers, rotation sensors, GPS sensors, altimeters,and the like), camera inputs (such as an image sensor, microphones,buttons, and the like), and data sources (such as clocks, externalservers, web pages, local memory, and the like). In some embodiments,one or more of the metadata sources 310 can be included within thecamera 330. Alternatively, one or more of the metadata sources 310 maybe integrated with a client device or another computing device such as,for example, a mobile phone.

The camera 330 can include a camera body, one or more a camera lenses,various indicators on the camera body (such as LEDs, displays, and thelike), various input mechanisms (such as buttons, switches, andtouch-screen mechanisms), and electronics (e.g., imaging electronics,power electronics, metadata sensors, etc.) internal to the camera bodyfor capturing images via the one or more lenses and/or performing otherfunctions. In one embodiment, the camera 330 may be capable of capturingspherical or substantially spherical content. As used herein, sphericalcontent may include still images or video having spherical orsubstantially spherical field of view. For example, in one embodiment,the camera 330 may capture an image or video having a 360 degree fieldof view in the horizontal plane and a 180 degree field of view in thevertical plane. Alternatively, the camera 330 may capture substantiallyspherical images or video having less than 360 degrees in the horizontaldirection and less than 180 degrees in the vertical direction (e.g.,within 10% of the field of view associated with fully sphericalcontent). In other embodiments, the camera 330 may capture images orvideo having a non-spherical wide angle field of view.

As described in greater detail in conjunction with FIG. 4 below, thecamera 330 can include sensors to capture metadata associated with videodata, such as timing data, motion data, speed data, acceleration data,altitude data, GPS data, and the like. In a particular embodiment,location and/or time centric metadata (geographic location, time, speed,etc.) can be incorporated into a media file together with the capturedcontent in order to track the location of the camera 330 over time. Thismetadata may be captured by the camera 330 itself or by another device(e.g., a mobile phone) proximate to the camera 330. In one embodiment,the metadata may be incorporated with the content stream by the camera330 as the content is being captured. In another embodiment, a metadatafile separate from the images or video file may be captured (by the samecapture device or a different capture device) and the two separate filescan be combined or otherwise processed together in post-processing.Furthermore, in one embodiment, metadata identifying the lenscharacteristics may be stored together with the image or video so thatin post-processing, a post-processing editor may determine what type oflens distortion may be present in the captured image or video.

The media server 340 may receive and store images or video captured bythe camera 330 and may allow users to access images or videos at a latertime. In one embodiment, the media server 340 may provide the user withan interface, such as a web page or native application installed on theclient device 335, to interact with and/or edit the stored images orvideos and to generate output images or videos relevant to a particularuser from one or more stored images or videos. At least some of outputimages or video frames may have a reduced field of view relative to theoriginal images or video frames so as to produce zooming, re-pointing,and/or panning effect. To generate the output images or video, the mediaserver 340 may extract a sequence of relevant sub-frames having thereduced field of view from the original images or video frames. Forexample, sub-frames may be selected from one or more input images orvideo frames to generate output images or video that tracks a path of aparticular individual or object. In one embodiment, the media server 340can automatically identify sub-frames by identifying spherical images orvideo captured near a particular location and time where a user waspresent (or other time and location of interest). In another embodiment,a time-varying path (e.g., a sequence of time-stamped locations) of atarget (e.g., a person, object, or other scene of interest) can be usedto automatically find spherical video having time and location metadataclosely matching the path. Furthermore, by correlating the relativelocation of the camera 330 with a location at each time point in thepath of interest, the media server 340 may automatically determine adirection between the camera 330 and the target and therebyautomatically select the appropriate sub-frames depicting the target. Inother embodiments, the media server 340 can automatically identifysub-frames of interest based on the image or video content itself or anassociated audio track. For example, facial recognition, objectrecognition, motion tracking, or other content recognition oridentification techniques may be applied to the video to identifysub-frames of interest. Alternatively, or in addition, a microphonearray may be used to determine directionality associated with a receivedaudio signal, and the sub-frames of interest may be chosen based on thedirection between the camera and the audio source. These embodimentsbeneficially can be performed without any location tracking of thetarget of interest. Furthermore, in one embodiment, after the mediaserver 340 identifies sub-frames of interest, the media server 340automatically obtains a sub-frame center location, a sub-frame size, anda scaling factor for transforming the input image based on the metadataassociated with the input image or based on image characteristics of theinput image (e.g., time and location of interest, target of interest,the image or video content itself or an associated audio track). Thescaling factor is defined as a ratio of a size of the input image to thesub-frame size. The media server 340 applies the crop or zoom effectapplied to the input image based on the sub-frame center location,sub-frame size, and the scaling factor to generate the sub-frame.Further still, any of the above techniques may be used in combination toautomatically determine which sub-frames to select for generating outputimages or video. In other embodiments, the selection of sub-frames maybe performed manually using post-processing tools, e.g., image or videoediting tools. In some embodiments, the media server 340 obtainsmetadata associated with the input image. The metadata at leastspecifies the lens characteristics of the lens to capture the inputimage. The media server 340 processes the sub-frame using the lenscharacteristics specified in the metadata. For example, the media server340 processes the sub-frame to remap the input lens distortion centeredin a first field of view of the input image to a desired lens distortionin the sub-frame centered in a second field of view of the sub-frame.The second field of view of the sub-frame is smaller than the firstfield of view. The desired lens distortion exhibits consistent lenscharacteristics with those in the input image. The media server 340outputs the processed sub-frame with the same size as the input image.

A user can interact with interfaces provided by the media server 340 viathe client device 335. The client device 335 may be any computing devicecapable of receiving user inputs as well as transmitting and/orreceiving data via the network 320. In one embodiment, the client device335 may comprise a conventional computer system, such as a desktop or alaptop computer. Alternatively, the client device 335 may comprise adevice having computer functionality, such as a personal digitalassistant (PDA), a mobile telephone, a smartphone or another suitabledevice. The user can use the client device 335 to view and interact withor edit videos or images stored on the media server 340. For example,the user can view web pages including summaries for a set of videos orimages captured by the camera 330 via a web browser on the client device335.

One or more input devices associated with the client device 335 mayreceive input from the user. For example, the client device 335 caninclude a touch-sensitive display, a keyboard, a trackpad, a mouse, avoice recognition system, and the like. In some embodiments, the clientdevice 335 can access videos, images, and/or metadata from the camera330 or one or more metadata sources 310, and can transfer the accessedmetadata to the media server 340. For example, the client device mayretrieve videos or images and metadata associated with the videos orimages from the camera via a universal serial bus (USB) cable couplingthe camera 330 and the client device 335. The client device 335 can thenupload the retrieved videos and metadata to the media server 340. In oneembodiment, the client device 335 may interact with the video server 340through an application programming interface (API) running on a nativeoperating system of the client device 335, such as IOS® or ANDROID™.While FIG. 3 shows a single client device 335, in various embodiments,any number of client devices 335 may communicate with the media server340.

The media server 340 may communicate with the client device 335, themetadata sources 310, and the camera 330 via the network 320, which mayinclude any combination of local area and/or wide area networks, usingboth wired and/or wireless communication systems. In one embodiment, thenetwork 320 may use standard communications technologies and/orprotocols. In some embodiments, the processes attributed to the client335 or media server 340 herein may instead by performed within thecamera 330.

Various components of the environment 300 of FIG. 3 such as the camera330, metadata source 310, media server 340, and client device 325 caninclude one or more processors and a non-transitory computer-readablestorage medium storing instructions therein that when executed cause theprocessor to carry out the functions attributed to the respectivedevices described herein.

Example Camera Configuration

FIG. 4 is a block diagram illustrating a camera 330, according to oneembodiment. In the illustrated embodiment, the camera 330 may comprise acamera core 410 comprising a lens 412, an image sensor 414, and an imageprocessor 416. The camera 330 may additionally include a systemcontroller 420 (e.g., a microcontroller or microprocessor) that maycontrol the operation and functionality of the camera 330 and systemmemory 430 that may be configured to store executable computerinstructions that, when executed by the system controller 420 and/or theimage processors 416, may perform the camera functionalities describedherein. In some embodiments, a camera 330 may include multiple cameracores 410 to capture fields of view in different directions which maythen be stitched together to form a cohesive image. For example, in anembodiment of a spherical camera system, the camera 330 may include twocamera cores 410 each having a hemispherical or hyperhemispherical lensthat each captures a hemispherical or hyperhemispherical field of viewwhich are stitched together in post-processing to form a sphericalimage.

The lens 412 can be, for example, a wide angle lens, hemispherical, orhyperhemispherical lens that focuses light entering the lens to theimage sensor 414 which captures images and/or video frames. As describedabove, different lens may produce different lens distortion effects indifferent portions of the image or video frame due to different lenscharacteristics. For example, the lens characteristics may causestraight lines in the image of a scene to appear as curved lines in atleast a portion of the image or video frame. In another example, thelens characteristics may change orientations of straight lines in animage of the scene. In such an example, the vertical or horizontalstraight lines may appear to be oblique lines in the image of the scene.In another example, the lens characteristics may cause lines of the samelength in the scene to appear to be different lengths in differentportions of the image or video frame. The lens characteristics may bebased on an optical design of the lens. Examples of lens characteristicsthat may affect the lens distortion may include, for example, a focallength, an f-number, a field of view, a magnification, a numericalaperture, a resolution, a working distance, an aperture size, lensmaterials, lens coatings, or other lens characteristics. Different typesof lens may have different lens characteristics causing differentdistortions. For example, a conventional lens may have a fixed focallength (e.g., greater than 50 mm) and produces a “natural” field of viewthat may look natural to observers from a normal view distance. A wideangle lens may have a shorter focal length (e.g., less than 40 mm) thanthe one of conventional lens and may produce a wide field of view (alsoreferred to as an expanded field of view). The types of the wide anglelens may include rectilinear wide-angle lens and a fisheye lens. Therectilinear wide-angle lens may produce a wide field of view that yieldsimages of a scene in which straight lines in the scene appear asstraight lines in the image. The fisheye lens produces a wider field ofview than the rectilinear wide-angle lens and may cause straight linesin the scene to appear as curved lines in the image in at least aportion of the image. A hemispherical lens (which may be a type offisheye lens) may produce a hemispherical field of view. A zoom lens maymagnify a scene so that objects in the scene appear larger than in theimage. A flat may have a flat shape that introduces other types ofdistortion into the image.

The image sensor 414 may capture high-definition images or video havinga resolution of, for example, 720p, 1080p, 4 k, or higher. In oneembodiment, spherical video or images may be captured as a 5760 pixelsby 2880 pixels with a 360 degree horizontal field of view and a 180degree vertical field of view. For video, the image sensor 414 maycapture video at frame rates of, for example, 30 frames per second, 60frames per second, or higher. The image processor 416 may perform one ormore image processing functions of the captured images or video. Forexample, the image processor 416 may perform a Bayer transformation,demosaicing, noise reduction, image sharpening, image stabilization,rolling shutter artifact reduction, color space conversion, compression,or other in-camera processing functions. Processed images and video maybe temporarily or persistently stored to system memory 430 and/or to anon-volatile storage, which may be in the form of internal storage or anexternal memory card.

An input/output (I/O) interface 460 may transmit and receive data fromvarious external devices. For example, the I/O interface 460 mayfacilitate the receiving or transmitting video or audio informationthrough an I/O port. Examples of I/O ports or interfaces may include USBports, HDMI ports, Ethernet ports, audioports, and the like.Furthermore, embodiments of the I/O interface 460 may include wirelessports that can accommodate wireless connections. Examples of wirelessports include Bluetooth, Wireless USB, Near Field Communication (NFC),and the like. The I/O interface 460 may also include an interface tosynchronize the camera 330 with other cameras or with other externaldevices, such as a remote control, a second camera, a smartphone, aclient device 235, or a media server 340.

A control/display subsystem 470 may include various control and displaycomponents associated with operation of the camera 330 including, forexample, LED lights, a display, buttons, microphones, speakers, and thelike. The audio subsystem 450 may include, for example, one or moremicrophones and one or more audio processors to capture and processaudio data correlated with video capture. In one embodiment, the audiosubsystem 450 may include a microphone array having two or microphonesarranged to obtain directional audio signals.

Sensors 440 may capture various metadata concurrently with, orseparately from, video or image capture. For example, the sensors 440may capture time-stamped location information based on a globalpositioning system (GPS) sensor, and/or an altimeter. Other sensors 440may be used to detect and capture orientation of the camera 330including, for example, an orientation sensor, an accelerometer, agyroscope, or a magnetometer. Sensor data captured from the varioussensors 440 may be processed to generate other types of metadata. Forexample, sensor data from the accelerometer may be used to generatemotion metadata, comprising velocity and/or acceleration vectorsrepresentative of motion of the camera 330. Furthermore, sensor datafrom the may be used to generate orientation metadata describing theorientation of the camera 330. Sensor data from the GPS sensor providesGPS coordinates identifying the location of the camera 330, and thealtimeter measures the altitude of the camera 330. In one embodiment,the sensors 440 may be rigidly coupled to the camera 330 such that anymotion, orientation or change in location experienced by the camera 330may also be experienced by the sensors 440. The sensors 440 furthermoremay associates a time stamp representing when the data was captured byeach sensor. In one embodiment, the sensors 440 may automatically begincollecting sensor metadata when the camera 330 begins recording a videoor captures an image.

Example Media Server Architecture

FIG. 5 is a block diagram of an architecture of the media server 340. Inthe illustrated embodiment, the media server 340 may comprise a userstorage 505, an image/video storage 510, a metadata storage 525, a webserver 530, a image/video generation module 540, and a pre-processingmodule 560. In other embodiments, the media server 340 may includeadditional, fewer, or different components for performing thefunctionalities described herein. Conventional components such asnetwork interfaces, security functions, load balancers, failoverservers, management and network operations consoles, and the like arenot shown so as to not obscure the details of the system architecture.

In an embodiment, the media server 340 may enable users to create andmanage individual user accounts. User account information is stored inthe user storage 505. A user account may include information provided bythe user (such as biographic information, geographic information, andthe like) and may also include additional information inferred by themedia server 340 (such as information associated with a user'shistorical use of a camera and interactions with the media server 340).Examples of user information may include a username, contactinformation, a user's hometown or geographic region, other locationinformation associated with the user, other users linked to the user as“friends,” and the like. The user storage 505 may include datadescribing interactions between a user and videos captured by the user.For example, a user account can include a unique identifier associatingvideos uploaded by the user with the user's user account.

The image/video storage 510 may store videos or images captured anduploaded by users of the media server 340. The media server 340 mayaccess videos or images captured using the camera 330 and store thevideos or images in the image/video storage 510. In one example, themedia server 340 may provide the user with an interface executing on theclient device 335 that the user may use to upload videos or images tothe image/video storage 510. In one embodiment, the media server 340 mayindex images and videos retrieved from the camera 330 or the clientdevice 335, and may store information associated with the indexed imagesand videos in the image/video storage 510. For example, the media server340 may provide the user with an interface to select one or more indexfilters used to index images or videos. Examples of index filters mayinclude but are not limited to: the time and location that the image orvideo was captured, the type of equipment used by the user (e.g., skiequipment, mountain bike equipment, etc.), the type of activity beingperformed by the user while the image or video was captured (e.g.,snowboarding, mountain biking, etc.), or the type of camera 330 used tocapture the content.

In some embodiments, the media server 340 generates a unique identifierfor each image or video stored in the image/video storage 510 which maybe stored as metadata associated with the image or video in the metadatastorage 525. In some embodiments, the generated identifier for aparticular image or video may be unique to a particular user. Forexample, each user can be associated with a first unique identifier(such as a 10-digit alphanumeric string), and each image or videocaptured by a user may be associated with a second unique identifiermade up of the first unique identifier associated with the userconcatenated with an image or video identifier (such as an 8-digitalphanumeric string unique to the user). Thus, each image or videoidentifier may be unique among all images and videos stored at theimage/video storage 510, and can be used to identify the user thatcaptured the image or video.

The metadata storage 525 may store metadata associated with images orvideos stored by the image/video storage 510 and with users stored inthe user storage 505. Particularly, for each image or video, themetadata storage 525 may store metadata including time-stamped locationinformation associated with each image or frame of the video to indicatethe location of the camera 330 at any particular moment during captureof the content. Additionally, the metadata storage 525 may store othertypes of sensor data captured by the camera 330 in association with animage or video frame including, for example, gyroscope data indicatingmotion and/or orientation of the device. In some embodiments, metadatacorresponding to an image or video may be stored within an image orvideo file itself, and not in a separate storage module. The metadatastorage 525 may also store time-stamped location information associatedwith a particular user so as to represent a user's physical path duringa particular time interval. This data may be obtained from a camera heldby the user, a mobile phone application that tracks the user's path, oranother metadata source. Furthermore, in one embodiment, the metadatastorage 525 stores metadata specifying the lens characteristics with theimage or video and metadata associated with the input image or imagecharacteristics of the input image (e.g., time and location of interest,target of interest, the image or video content itself or an associatedaudio track).

The web server 530 may provide a communicative interface between themedia server 340 and other entities of the environment of FIG. 3. Forexample, the web server 530 may access videos and associated metadatafrom the camera 330 or the client device 335 to store in the image/videostorage 510 and the metadata storage 525, respectively. The web server530 can also receive user input provided to the client device 335, canrequest automatically generated output images or videos relevant to theuser generated from the stored video content. The web server 530 mayfurthermore include editing tools to enables users to edit images orvideos stored in the video storage 510.

A pre-processing module 560 may pre-process and indexes uploaded imagesor videos. For example, in one embodiment, uploaded images or videos maybe automatically processed by the pre-processing module 560 to conformthe images or videos to a particular file format, resolution, etc.Furthermore, in one embodiment, the pre-processing module 560 mayautomatically parse the metadata associated with images or videos uponbeing uploaded.

The image/video generation module 540 may automatically generate outputimages or videos relevant to a user or to a particular set of inputs.For example, the image/video generation module 540 may generate anoutput video or sequence of images including content that tracks asequence of locations representing a physical path over a particulartime interval. Alternatively, the image/video generation module 440 maygenerate an output video or sequence of images including content thattracks a particular face or object identified in the images or video,tracks an area of motion having particular motion characteristics,tracks an identified audio source, etc. The output images or videos mayhave a reduced field of view (e.g., a standard non-spherical field ofview) and represent relevant sub-frames to provide an image or video ofinterest. For example, the image or video may track a particular path ofan individual, object, or other target so that each sub-frame depictsthe target as the target moves through a given scene.

In some embodiments, image/video generation module 540 obtains metadataassociated with the input image from metadata storage 525 and identifiessub-frames of interest. The image/video generation module 540automatically obtains a sub-frame center location, a sub-frame size, anda scaling factor for transforming the input image based on the metadataassociated with the input image or image characteristics of the inputimage (e.g., time and location of interest, target of interest, theimage or video content itself or an associated audio track). Theimage/video generation module 540 processes the sub-frame using the lenscharacteristics specified in the metadata and outputs the processedsub-frame with the same size as the input image.

In an embodiment, the media server 340 may enable the user to selectfrom predefined image or video generation templates. For example, theuser can request that the media server 340 generate a video or set ofimages based on location tracking, based on facial recognition, gesturerecognition, audio tracking, motion detection, voice recognition, orother techniques. Various parameters used by the media server 340 toselect relevant frames such as thresholds governing proximity distanceand clip duration can be adjusted or pre-set.

In an embodiment, the user interface may also provide an interactiveviewer that enables the user to pan around within the content beingviewed. This may allow the user to search for significant moments toincorporate into the output video or image and manually edit theautomatically generated video or image. In one embodiment, the userinterface enables various editing effects to be added to a generatedoutput image or video. For example, the editing interface may enableeffects such as, cut-away effects, panning, tilting, rotations, reverseangles, image stabilization, zooming, object tracking,

Process for Virtual Lens Simulation

FIG. 6 illustrates an example embodiment of a process for generating anoutput image or video using a virtual lens model. The media server 340may receive 602 an input image or video frame depicting a scene, whichmay have a first field of view, such as, for example, a wide angle orspherical field of view. Furthermore, the input image may depict thescene with a lens distortion centered on the field of view of the inputimage. Thus, for example, if a fisheye lens is used, straight lines ofthe scene in the center of the input image may appear straight whilestraight lines of the scene near the edges of the input image may appearcurved. The media server 340 may obtain 604 a selection of a sub-frame(e.g., either manually or automatically) comprising a second field ofview which may be a reduced field relative to the input image or videoframe. For example, the sub-frame may be selected as a re-pointing ofthe original input image or video frame, a crop of the original inputimage or video frame, or a zoomed in portion of the original input imageor video frame. The sub-frame may be processed 606 to remap the inputlens distortion centered on the first field of view of the originalinput image or video frame to a desired lens distortion centered on asecond field of view of the sub-frame. This remapping may comprise atransformation that may have the same general effect as removing theexisting lens distortion effect present in the sub-frame and thenapplying a desired lens distortion effect, but may do so by applying adirect mapping instead of two separate operations. For example, theremapping be achieved by applying a direct transformation function thatdescribes a relationship between the input lens distortion of the inputsub-frame (which may be centered on the original input image or videoframe) and the desired lens distortion of the output sub-frame (whichmay be centered on the sub-frame). For example, in an embodiment, thesingle function transformation may be determined based on a combination(e.g., a product) of a first function to remove the lens distortion andconvert the original input image or video frame to a rectilinear image,and a second function to apply the desired lens distortion. However, thetransformation may be achieved without an intermediate step ofconverting to rectilinear. The direct mapping may enable thetransformation to be achieved with higher quality and less loss than acomparable two-step process of separately removing the input distortionand then introducing the desired lens distortion. The transformedsub-frame may simulate the distortion that would be seen if the field ofview of the sub-frame was originally captured by a camera having thedesired lens distortion. In one embodiment, the desired lens distortioneffect may match the lens distortion present in the initial input imageor video frame prior to extracting the sub-frame, but may be re-centeredon the sub-frame. In one embodiment, the function(s) may be determinedbased on metadata stored with the input image or video that specifiesthe type or characteristics of the lens used the capture the input imageor video. The processed sub-frame is then outputted 508. The process mayrepeat 510 for each frame of an input video to generate an output videohaving the desired lens distortion effect or may be applied to each of aset of input images.

In an alternative embodiment, a two-step transformation may be usedinstead of a direct mapping. For example, based on known characteristicsof the lens and the location and size of the selected sub-frame, anappropriate inverse function may be performed to remove the lensdistortion present in the sub-frame. For example, if the original inputimage or video frame is captured with a fisheye lens, curvature in theareas of the sub-frame corresponding to the edges and corners of theoriginal input image or video frame may be removed. The inverse functionof the input lens distortion may be applied centered on the field ofview of the original input image or video frame. As a result of applyingthe inverse function, the sub-frame may be transformed to a rectilinearimage in which straight lines in the portion of the scene depicted inthe sub-frame appear straight. Then, a desired lens distortion functioncentered at the center of the sub-frame may be applied to therectilinear image to re-introduce a lens distortion effect.

Additional Configuration Considerations

Throughout this specification, some embodiments have used the expression“coupled” along with its derivatives. The term “coupled” as used hereinis not necessarily limited to two or more elements being in directphysical or electrical contact. Rather, the term “coupled” may alsoencompass two or more elements are not in direct contact with eachother, but yet still co-operate or interact with each other, or arestructured to provide a thermal conduction path between the elements.

Likewise, as used herein, the terms “comprises,” “comprising,”“includes,” “including,” “has,” “having” or any other variation thereof,are intended to cover a non-exclusive inclusion. For example, a process,method, article, or apparatus that comprises a list of elements is notnecessarily limited to only those elements but may include otherelements not expressly listed or inherent to such process, method,article, or apparatus.

In addition, use of the “a” or “an” are employed to describe elementsand components of the embodiments herein. This is done merely forconvenience and to give a general sense of the invention. Thisdescription should be read to include one or at least one and thesingular also includes the plural unless it is obvious that it is meantotherwise.

Finally, as used herein any reference to “one embodiment” or “anembodiment” means that a particular element, feature, structure, orcharacteristic described in connection with the embodiment is includedin at least one embodiment. The appearances of the phrase “in oneembodiment” in various places in the specification are not necessarilyall referring to the same embodiment.

Upon reading this disclosure, those of skill in the art will appreciatestill additional alternative structural and functional designs for thedescribed embodiments as disclosed from the principles herein. Thus,while particular embodiments and applications have been illustrated anddescribed, it is to be understood that the disclosed embodiments are notlimited to the precise construction and components disclosed herein.Various modifications, changes and variations, which will be apparent tothose skilled in the art, may be made in the arrangement, operation anddetails of the method and apparatus disclosed herein without departingfrom the scope defined in the appended claims.

The invention claimed is:
 1. A method for simulating a virtual lens whenapplying a crop or zoom effect to an input image, the method comprising:receiving, by a processor, the input image, the input image having afirst field of view of a scene, the input image depicting the scene withan input lens distortion centered in the first field of view, the inputlens distortion caused by lens characteristics of a lens used to capturethe input image, the lens centered at the first field of view duringcapture of the input image; identifying, by the processor, the inputlens distortion within the input image; obtaining, by the processor, aselection of a sub-frame representing a portion of the input image, thesub-frame having a second field of view of the scene smaller than thefirst field of view; determining, by the processor, an input lensdistortion effect present in the sub-frame based on the input lensdistortion centered in the first field of view, a location of thesub-frame within the first field of view, and a size of the second fieldof view; and generating, by the processor, an output image based on theinput lens distortion and the input lens distortion effect present inthe sub-frame, the output image including the sub-frame remapped fromthe input lens distortion centered in the first field of view to theinput lens distortion centered in the second field of view such that aportion of the scene depicted in the sub-frame appears to have beencaptured using the lens centered at the second field of view.
 2. Themethod of claim 1, wherein the input lens distortion caused by the lenscharacteristics causes straight lines in the scene to appear as curvedlines in at least a portion of the input image.
 3. The method of claim1, wherein the input lens distortion comprises a distortion produced bya conventional lens, a wide angle lens, a fisheye lens, a hemisphericallens, a zoom lens, or a flat lens.
 4. The method of claim 1, whereinobtaining the selection of the sub-frame representing the portion of theinput image comprises: automatically identifying the sub-frame based onmetadata associated with the input image or image characteristics of theinput image; automatically obtaining a sub-frame center location, asub-frame size, and a scaling factor for transforming the input image;and applying the crop or zoom effect applied to the input image based onthe sub-frame center location, the sub-frame size, and the scalingfactor to generate the sub-frame.
 5. The method of claim 1, whereinobtaining the selection of the sub-frame representing the portion of theinput image further comprises: receiving a manual selection of thesub-frame from post-processing tools.
 6. The method of claim 1, whereingenerating the output image comprises: obtaining metadata associatedwith the input image, the metadata specifying the lens characteristicsof the lens used to capture the input image; and processing thesub-frame using the lens characteristics specified in the metadata. 7.The method of claim 1, wherein generating the output image comprises:applying an inverse input lens distortion function to the sub-frame toremove the input lens distortion effect present in the sub-frame togenerate a rectilinear image, wherein straight lines in the scene withinthe sub-frame appear as straight lines in the rectilinear image; andapplying an input lens distortion function to apply the input lensdistortion to the rectilinear image.
 8. The method of claim 1, whereinthe sub-frame is remapped from the input lens distortion centered in thefirst field of view to the input lens distortion centered in the secondfield of view by applying a direct function to remap the sub-framewithout an intermediate step of removing the input lens distortioneffect present in the sub-frame.
 9. A non-transitory computer-readablestorage medium storing instructions for simulating a virtual lens whenapplying a crop or zoom effect to an input image, the instructions whenexecuted by one or more processors causing the one or more processors toperform steps including: receiving the input image, the input imagehaving a first field of view of a scene, the input image depicting thescene with an input lens distortion centered in the first field of view,the input lens distortion caused by lens characteristics of a lens usedto capture the input image, the lens centered at the first field of viewduring capture of the input image; identifying the input lens distortionwithin the input image; obtaining a selection of a sub-framerepresenting a portion of the input image, the sub-frame having a secondfield of view of the scene smaller than the first field of view;determining an input lens distortion effect present in the sub-framebased on the input lens distortion centered in the first field of view,a location of the sub-frame within the first field of view, and a sizeof the second field of view; and generating an output image based on theinput lens distortion and the input lens distortion effect present inthe sub-frame, the output image including the sub-frame remapped fromthe input lens distortion centered in the first field of view to theinput lens distortion centered in the second field of view such that aportion of the scene depicted in the sub-frame appears to have beencaptured using the lens centered at the second field of view.
 10. Thenon-transitory computer-readable storage medium of claim 9, wherein theinput lens distortion caused by the lens characteristics causes straightlines in the scene to appear as curved lines in at least a portion ofthe input image.
 11. The non-transitory computer-readable storage mediumof claim 9, wherein the input lens distortion comprises a distortionproduced by a conventional lens, a wide angle lens, a fisheye lens, ahemispherical lens, a zoom lens, or a flat lens.
 12. The non-transitorycomputer-readable storage medium of claim 9, wherein obtaining theselection of the sub-frame representing the portion of the input imagecomprises: automatically identifying the sub-frame based on metadataassociated with the input image or image characteristics of the inputimage; automatically obtaining a sub-frame center location, a sub-framesize, and a scaling factor for transforming the input image; andapplying the crop or zoom effect applied to the input image based on thesub-frame center location, the sub-frame size, and the scaling factor togenerate the sub-frame.
 13. The non-transitory computer-readable storagemedium of claim 9, wherein obtaining the selection of the sub-framerepresenting the portion of the input image further comprises: receivinga manual selection of the sub-frame from post-processing tools.
 14. Thenon-transitory computer-readable storage medium of claim 9, whereingenerating the output image comprises: obtaining metadata associatedwith the input image, the metadata specifying the lens characteristicsof the lens used to capture the input image; and processing thesub-frame using the lens characteristics specified in the metadata. 15.The non-transitory computer-readable storage medium of claim 9, whereingenerating the output image comprises: applying an inverse input lensdistortion function to the sub-frame to remove the input lens distortioneffect present in the sub-frame to generate a rectilinear image, whereinstraight lines in the scene within the sub-frame appear as straightlines in the rectilinear image; and applying an input lens distortionfunction to apply the input lens distortion to the rectilinear image.16. The non-transitory computer-readable storage medium of claim 9,wherein the sub-frame is remapped from the input lens distortioncentered in the first field of view to the input lens distortioncentered in the second field of view by applying a direct function toremap the sub-frame without an intermediate step of removing the inputlens distortion effect present in the sub-frame.
 17. A system forsimulating a virtual lens when applying a crop or zoom effect to aninput image, the system comprising: one or more processors; and anon-transitory computer-readable storage medium storing instructions forsimulating the virtual lens when applying a crop or zoom effect to theinput image, the instructions when executed by one or more processorscausing the one or more processors to perform steps including: receivingthe input image, the input image having a first field of view of ascene, the input image depicting the scene with an input lens distortioncentered in the first field of view, the input lens distortion caused bylens characteristics of a lens used to capture the input image, the lenscentered at the first field of view during capture of the input image;identifying the input lens distortion within the input image; obtaininga selection of a sub-frame representing a portion of the input image,the sub-frame having a second field of view of the scene smaller thanthe first field of view; determining an input lens distortion effectpresent in the sub-frame based on the input lens distortion centered inthe first field of view, a location of the sub-frame within the firstfield of view, and a size of the second field of view; and generating anoutput image based on the input lens distortion and the input lensdistortion effect present in the sub-frame, the output image includingthe sub-frame remapped from the input lens distortion centered in thefirst field of view to the input lens distortion centered in the secondfield of view such that a portion of the scene depicted in the sub-frameappears to have been captured using the lens centered at the secondfield of view.
 18. The system of claim 17, wherein the input lensdistortion caused by the lens characteristics causes straight lines inthe scene to appear as curved lines in at least a portion of the inputimage.
 19. The system of claim 17, wherein the input lens distortioncomprises a distortion produced by a conventional lens, a wide anglelens, a fisheye lens, a hemispherical lens, a zoom lens, or a flat lens.20. The system of claim 17, wherein obtaining the selection of thesub-frame representing the portion of the input image comprises:automatically identifying the sub-frame based on metadata associatedwith the input image or image characteristics of the input image;automatically obtaining a sub-frame center location, a sub-frame size,and a scaling factor for transforming the input image; and applying thecrop or zoom effect applied to the input image based on the sub-framecenter location, the sub-frame size, and the scaling factor to generatethe sub-frame.